package com.zhledu.datastructure.List;

public class Yhsj {
    public static void main(String[] args) {
        print(7);
    }

    public static void print(int n) {
        int rowNum = n;
        int colNum = 2 * n - 1;
        int[][] a = new int[rowNum][colNum];
        for (int i = 0; i < rowNum; i++) {

            for (int j = 0; j < colNum; j++) {
                if (j == colNum / 2 - i || j == colNum / 2 + i) {
                    a[i][j] = 1;
                }



                if (a[i][j] == 0) {
                    System.out.print(" ");
                } else {
                    System.out.print(a[i][j]);
                }

            }
            System.out.println();
        }


    }
}
